package cn.bonoon.entities.plugins;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import cn.bonoon.kernel.support.entities.AbstractEntity;

/**
 * 日程安排（ 同一天内可以有n(n>=0)条记录）
 * 
 * @author ocean~
 */
@Entity
@Table(name = "T_SCHEDULE")
public class ScheduleEntity extends AbstractEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4577265940314573027L;

	/**
	 * 类型（0.日程安排； 1.工作安排 ）
	 */
	@Column(name = "C_TYPE")
	private int type;

	/**
	 * 执行时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "C_EXECUTEAT")
	private Date executeAt;

	/**
	 * 内容
	 */
	@Column(name = "C_CONTENT")
	private String content;

	/**
	 * 是否提醒
	 */
	@Column(name = "C_ALARM")
	private boolean alarm;

	/**
	 * 提前多少小时提醒（非负数）
	 */
	@Column(name = "C_ALARMTIME")
	private long alarmTime;

	/**
	 * 提醒方式（0.邮件； 1.短信； 2.邮件和短信）
	 */
	@Column(name = "C_ALARMTYPE")
	private int alarmType;

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public Date getExecuteAt() {
		return executeAt;
	}

	public void setExecuteAt(Date executeAt) {
		this.executeAt = executeAt;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public boolean isAlarm() {
		return alarm;
	}

	public void setAlarm(boolean alarm) {
		this.alarm = alarm;
	}

	public long getAlarmTime() {
		return alarmTime;
	}

	public void setAlarmTime(long alarmTime) {
		this.alarmTime = alarmTime;
	}

	public int getAlarmType() {
		return alarmType;
	}

	public void setAlarmType(int alarmType) {
		this.alarmType = alarmType;
	}

}
